package com.zhongyouyun.admin.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhongyouyun.admin.model.DictModel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhongyouyun.admin.model.RoleModel;
import com.zhongyouyun.admin.pojo.DictPojo;
import com.zhongyouyun.admin.pojo.UserPojo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * @Author: shenyi
 * @Date: 2021-12-20
 * @Description: Mapper
 */
@Mapper
public interface DictMapper extends BaseMapper<DictModel> {

    List<DictModel> selectListbyRoleId(RoleModel roleModel);

    @SqlParser(filter = true)
    IPage<UserPojo> selectUserPage(Page page, @Param(Constants.WRAPPER) Wrapper query, @Param("id") Long id, @Param("state") String state);

    IPage<DictPojo> selectPojoPage(Page page,@Param(Constants.WRAPPER) Wrapper query);
}
